package magneticCave;



///Class Piece - represents a piece (or a potential piece) in a potential winning line
///Used by class PotentialLine, for AI/evaluation

class Piece
{
	
	public int x, y;
	public int state;
	public static final int IMAGINARY=2;
	public static final int DIAGONAL=4;
	public static final int ANCHORED=8;
	public static final int IN_MIDDLE=16;
	public static final int BLOCKED=32;
	
	
	public Piece(int x, int y, int state)
	{
		this.x = x;
		this.y = y; 
		this.state = state;
		
	}	 
	
	public Piece(Piece otherPiece)
	{
		x = otherPiece.x;
		y = otherPiece.y;
		state = otherPiece.state;
	}
	
	public void AddState(int state)
	{
		this.state |= state;
	}
	
	public void RemoveState(int nstate)
	{
		this.state &= ~(nstate);
	}
	
	
}

